﻿<UserControl x:Class="MediaBrowser.Gui.Views.PageMoviesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ViewModel="clr-namespace:MediaBrowser.Gui.ViewModels"
    xmlns:Views="clr-namespace:MediaBrowser.Gui.Views"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:CustomControls_Transitions="clr-namespace:MediaBrowser.CustomControls.Transitionals;assembly=MediaBrowser.CustomControls"
    xmlns:MediaBrowser_Controls="clr-namespace:MediaBrowser.CustomControls;assembly=MediaBrowser.CustomControls"	
    xmlns:Converters="clr-namespace:MediaBrowser.Gui.Converters"
    xmlns:EffectsLib="clr-namespace:EffectsLib;assembly=EffectsLib" 
    mc:Ignorable="d"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:julmar="http://www.julmar.com/wpfhelpers"
    d:DesignWidth="800" d:DesignHeight="600">

    <!--<UserControl.DataContext>
        <Binding Mode="OneWay" Path="Movies" Source="{StaticResource Locator}"/>
    </UserControl.DataContext>-->

    <UserControl.Resources>

        <ViewModel:ViewModelLocator x:Key="Locator" d:IsDataSource="True"/>
        <Converters:StringToImageConverter x:Key="stringToImageConverter" />

        <Storyboard x:Key="ShowCtrlAdminMovies" AccelerationRatio="0.5" DecelerationRatio="0.5" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" 
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Left" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="False"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Data" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="False"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Img" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="False"/>
            </BooleanAnimationUsingKeyFrames>
            <DoubleAnimation BeginTime="00:00:00" From="0"  To="-0.5" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Left" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="0"  To="-0.5" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Data" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="0"  To="-0.5" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Img" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
        </Storyboard>

        <Storyboard x:Key="HideCtrlAdminMovies" AccelerationRatio="0.5" DecelerationRatio="0.5" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" 
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlAdminMovies" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Left" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Data" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Img" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <DoubleAnimation BeginTime="00:00:00" From="-0.5"  To="-0" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Left" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="-0.5"  To="-0" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Data" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="-0.5"  To="-0" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Img" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
        </Storyboard>

        <Storyboard x:Key="ShowCtrlPlayer" AccelerationRatio="0.5" DecelerationRatio="0.5" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" 
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Left" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="False"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Data" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="False"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Img" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="False"/>
            </BooleanAnimationUsingKeyFrames>
            <DoubleAnimation BeginTime="00:00:00" From="0"  To="-0.5" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Left" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="0"  To="-0.5" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Data" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="0"  To="-0.5" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Img" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
        </Storyboard>

        <Storyboard x:Key="HideCtrlPlayer" AccelerationRatio="0.5" DecelerationRatio="0.5" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" 
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Left" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Data" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Grp_Img" Storyboard.TargetProperty="(UIElement.IsEnabled)">
                <DiscreteBooleanKeyFrame KeyTime="00:00:01" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <DoubleAnimation BeginTime="00:00:00" From="-0.5"  To="-0" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Left" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="-0.5"  To="-0" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Data" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
            <DoubleAnimation BeginTime="00:00:00" From="-0.5"  To="-0" Duration="00:00:00.25"  
                                             Storyboard.TargetName="Grp_Img" 
                                             Storyboard.TargetProperty="(UIElement.Effect).(EffectsLib:BrightContrastEffect.Contrast)"/>
        </Storyboard>

        <Storyboard x:Key="MinimizeCtrlPlayer" AccelerationRatio="0.5" DecelerationRatio="0.5" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="640"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="480"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="MaximizeCtrlPlayer" AccelerationRatio="0.5" DecelerationRatio="0.5" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="{Binding ActualWidth, ElementName=GrdMain, Mode=Default}"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="UserCtrlPlayer" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="{Binding ActualHeight, ElementName=GrdMain, Mode=Default}"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btAdd">
            <BeginStoryboard Storyboard="{StaticResource ShowCtrlAdminMovies}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btUp">
            <BeginStoryboard Storyboard="{StaticResource ShowCtrlAdminMovies}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Views:UserCtrlAdminMovies.OnClose" SourceName="UserCtrlAdminMovies">
            <BeginStoryboard Storyboard="{StaticResource HideCtrlAdminMovies}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btPlay">
            <BeginStoryboard Storyboard="{StaticResource ShowCtrlPlayer}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Views:UserCtrlPlayer.OnClose" SourceName="UserCtrlPlayer">
            <BeginStoryboard Storyboard="{StaticResource HideCtrlPlayer}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Views:UserCtrlPlayer.OnMinimize" SourceName="UserCtrlPlayer">
            <BeginStoryboard Storyboard="{StaticResource MinimizeCtrlPlayer}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Views:UserCtrlPlayer.OnMaximize" SourceName="UserCtrlPlayer">
            <BeginStoryboard Storyboard="{StaticResource MaximizeCtrlPlayer}"/>
        </EventTrigger>
    </UserControl.Triggers>

    <Grid x:Name="GrdMain" DataContext="{Binding Mode=OneWay, Path=Movies, Source={StaticResource Locator}}">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="400"/>
        </Grid.ColumnDefinitions>

        <!-- LEFT -->
        <GroupBox Grid.Column="0" x:Name="Grp_Left"
                  HorizontalContentAlignment="Stretch"
                  VerticalContentAlignment="Stretch"
                  Height="Auto" Margin="10,10,10,10" >
            <GroupBox.Effect>
                <EffectsLib:BrightContrastEffect/>
            </GroupBox.Effect>
            <GroupBox.Header>
                <Label Foreground="WhiteSmoke" 
				  		FontSize="9" 
						FontWeight="Bold">
                    Liste des Films
                </Label>
            </GroupBox.Header>
            <!--<GroupBox.Effect>
                <DropShadowEffect/>
            </GroupBox.Effect>-->
            <Grid>

                <Grid.RowDefinitions>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>

                <StackPanel x:Name="bd"
                    Grid.Row="0"
                    Orientation="Horizontal"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Center">
                    <TextBox x:Name="tbSearch" Width="150"
                     Text="{Binding MediaLookFor, UpdateSourceTrigger=PropertyChanged, Mode=OneWayToSource}" />
                </StackPanel>

                <ListBox Name="lMedias" SelectionMode="Extended" ItemsSource="{Binding Medias}" 
                         Grid.Row="1" IsSynchronizedWithCurrentItem="True"  Background="{x:Null}"
                         HorizontalContentAlignment="Stretch">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Background="{x:Null}" Text="{Binding Name}" ToolTip="{Binding Name}" Width="151.887"/>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

                <Grid Grid.Row="2">
                    <MediaBrowser_Controls:ImageButton x:Name="btPlay" Source="/MediaBrowser.Gui;Component/Images/film_go.png" 
                                                       Height="20" Margin="2,0,0,0" ToolTip="Visualiser le Film"
                                                       HorizontalAlignment="Left" Width="20" />
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                        <MediaBrowser_Controls:ImageButton x:Name="btAdd" Command="{Binding PrepareAddMovieCommand}" Source="/MediaBrowser.Gui;Component/Images/film_add.png" Height="20" Margin="0,0,5,0" ToolTip="Ajouter un Film"/>
                        <MediaBrowser_Controls:ImageButton x:Name="btUp" Command="{Binding PrepareUpdateMovieCommand}" Source="/MediaBrowser.Gui;Component/Images/film_edit.png" Height="20" Margin="0,0,5,0" ToolTip="Modifier un Film"/>
                        <MediaBrowser_Controls:ImageButton Command="{Binding DeleteMovieCommand}" Source="/MediaBrowser.Gui;Component/Images/film_delete.png" Height="20" Margin="0,0,1,0" ToolTip="Supprimer un Film"/>
                    </StackPanel>
                </Grid>

            </Grid>
        </GroupBox>
        <!-- END LEFT -->

        <!-- GRID DATA -->
        <GroupBox Grid.Column="1" Grid.Row="0" x:Name="Grp_Data"
                  HorizontalContentAlignment="Stretch"
                  VerticalContentAlignment="Stretch"
                  VerticalAlignment="Stretch"  Height="Auto" Margin="10,10,10,10">
            <GroupBox.Effect>
                <EffectsLib:BrightContrastEffect/>
            </GroupBox.Effect>
            <GroupBox.Header>
                <Label Foreground="WhiteSmoke" 
				  		FontSize="9" 
						FontWeight="Bold">
                    Informations
                </Label>
            </GroupBox.Header>
            <!--<GroupBox.Effect>
                <DropShadowEffect/>
            </GroupBox.Effect>-->
            <Grid x:Name="Grid_Data" Margin="0,5,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="20" />
                    <RowDefinition Height="20" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="250"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Label Grid.Column="0" Grid.Row="0" Content="Nom : " Foreground="Gray"/>
                <Label Grid.Column="1" Grid.Row="0" Content="{Binding CurrentMedia.Name}" Foreground="WhiteSmoke" />

                <Label Grid.Column="0" Grid.Row="1" Content="Date création : " Foreground="Gray" />
                <Label Grid.Column="1" Grid.Row="1" Content="{Binding CurrentMedia.DateCreation}" Foreground="WhiteSmoke" />

                <Label Grid.Column="0" Grid.Row="2" Content="Description" Foreground="Gray" />

                <TextBox x:Name="textBox" Grid.Row="3" Grid.ColumnSpan="3" 
                         Text="{Binding CurrentMedia.Description}"
                         TextWrapping="Wrap" 
                         VerticalScrollBarVisibility="Visible"
                         AcceptsReturn="True" FontSize="13.333">
                    <TextBox.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFD1D4D6" Offset="0"/>
                            <GradientStop Color="White" Offset="0.511"/>
                            <GradientStop Color="White" Offset="1"/>
                        </LinearGradientBrush>
                    </TextBox.Background>
                </TextBox>
            </Grid>
        </GroupBox>
        <!-- END DATA -->

        <!-- GRID IMG -->
        <GroupBox Grid.Column="2" x:Name="Grp_Img"
                  HorizontalContentAlignment="Stretch"
                  VerticalContentAlignment="Stretch"
                  VerticalAlignment="Stretch" Height="Auto" Width="Auto" Margin="10,10,10,10">
            <GroupBox.Effect>
                <EffectsLib:BrightContrastEffect/>
            </GroupBox.Effect>
            <GroupBox.Header>
                <Label Foreground="WhiteSmoke" 
				  		FontSize="9" 
						FontWeight="Bold">
                    Affiche
                </Label>
            </GroupBox.Header>
            <!--<GroupBox.Effect>
                <DropShadowEffect/>
            </GroupBox.Effect>-->
            <CustomControls_Transitions:FadeTransition ContentTransition="{Binding CurrentMedia.UrlImage,Converter={StaticResource stringToImageConverter}}" BorderThickness="0,5,0,0" Margin="0,5,0,0"/>

        </GroupBox>
        <!-- END IMG -->

        <!-- ADMIN MOVIES -->
        <Views:UserCtrlAdminMovies x:Name="UserCtrlAdminMovies" Width="500" Height="550" Grid.ColumnSpan="3" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <Views:UserCtrlAdminMovies.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0" ScaleY="0"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Views:UserCtrlAdminMovies.RenderTransform>
        </Views:UserCtrlAdminMovies>

        <!-- PLAYER -->
        <Views:UserCtrlPlayer x:Name="UserCtrlPlayer" Width="600" Height="400" Grid.ColumnSpan="3" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <Views:UserCtrlPlayer.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0" ScaleY="0"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Views:UserCtrlPlayer.RenderTransform>
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="OnClose">
                    <julmar:InvokeCommand Command="{Binding StopVideoCommand, Mode=Default}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Views:UserCtrlPlayer>

    </Grid>
</UserControl>
